import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router'
import pinia from './store'
//@ts-expect-error忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//svg插件需要的配置代码
import 'virtual:svg-icons-register'
//注册全局组件
import gloablComponent from './components'
//暗黑模式需要的样式
import 'element-plus/theme-chalk/dark/css-vars.css'
//全局样式
import './styles/index.scss'
//引入路由鉴权文件
import './permisstion'
const app = createApp(App)
//国际化配置
app
  .use(ElementPlus, {
    locale: zhCn,
  })
  .use(gloablComponent)
  .use(router)
  .use(pinia)
app.mount('#app')
